package com.ruoyi.system.mapper.fx;

import com.ruoyi.system.domain.dto.FxGoodPurchaseDto;
import com.ruoyi.system.domain.fx.FxGoodPurchase;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

/**
 * 商品采购Mapper接口
 *
 * @author ruoyi
 * @date 2024-07-23
 */
public interface FxGoodPurchaseMapper {
    /**
     * 查询商品采购
     *
     * @param id 商品采购主键
     * @return 商品采购
     */
    public FxGoodPurchase selectFxGoodPurchaseById(Long id);

    /**
     * 查询商品采购列表
     *
     * @param fxGoodPurchase 商品采购
     * @return 商品采购集合
     */
    public List<FxGoodPurchase> selectFxGoodPurchaseList(FxGoodPurchase fxGoodPurchase);

    /**
     * 查询商品采购列表
     * @param fxGoodPurchase
     * @return
     */
    public List<FxGoodPurchase> selectFxGoodPurchaseListByGoodName(FxGoodPurchase fxGoodPurchase);

    public List<FxGoodPurchase> selectFxGoodSonPurchaseListByGoodName(FxGoodPurchase fxGoodPurchase);

    /**
     * 查询商品采购列表 有无当前商品
     * @param fxGoodPurchaseDto
     * @return
     */
    List<FxGoodPurchase> selectAllByStoreIdAndGoodId(FxGoodPurchaseDto fxGoodPurchaseDto);



    public int selectFxGoodPurchaseListCount(FxGoodPurchase fxGoodPurchase);

    /**
     * 新增商品采购
     *
     * @param fxGoodPurchase 商品采购
     * @return 结果
     */
    public int insertFxGoodPurchase(FxGoodPurchase fxGoodPurchase);

    /**
     * 批量插入
     *
     * @param goodPurchases
     */
    int insertBatch(List<FxGoodPurchase> goodPurchases);

    /**
     * 修改商品采购
     *
     * @param fxGoodPurchase 商品采购
     * @return 结果
     */
    public int updateFxGoodPurchase(FxGoodPurchase fxGoodPurchase);

    int updatePurchaseStatus(@Param("ids") Set<Long> ids);

    /**
     * 删除商品采购
     *
     * @param id 商品采购主键
     * @return 结果
     */
    public int deleteFxGoodPurchaseById(Long id);

    /**
     * 批量删除商品采购
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteFxGoodPurchaseByIds(Long[] ids);
}
